{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="ibox float-e-margins">
        {include file="public/tophead"}
        {include file="public/top" /}
        <div class="ibox-content">
            <div class="row row-lg">
                <div class="col-xs-12">
                    <div class="example">
                        <table data-toggle="table" data-striped="false">
                            <thead>
                            <tr>
                                <th data-align="center">id</th>
                                <th data-align="center">账户</th>
                                <th data-align="center">类别</th>
                                <th data-align="center">代理城市</th>
                                <th data-align="center">客服</th>
                                <th data-align="center">添加时间</th>
                                <th data-align="center">更新时间</th>
                                <th data-align="center">添加登录IP</th>
                                <th data-align="center">最后登录IP</th>
                                <th data-align="center">状态</th>
                                <th data-align="center">管理</th>
                            </tr>
                            </thead>
                            <tbody>
                            {volist name="data" id="v"}
                            <tr id="id{$v.id}">
                                <td>{$v.id}</td>
                                <td>{$v.name}</td>
                                <td>{$v.title}</td>
                                <td>{$v.city|default='无'}</td>
                                <td>{if $v.is_customer_service}√{else}×{/if}</td>
                                <td>{$v.create_time|date='Y-m-d H:i:s'}</td>
                                <td>{$v.update_time|date='Y-m-d H:i:s'}</td>
                                <td>{$v.create_ip}</td>
                                <td>{$v.update_ip}</td>
                                <td>{if $v.hide eq 0}禁用{else}正常{/if}账户</td>
                                <td>
                                    <div class="btn-group">
                                        <button data-toggle="dropdown" class="btn btn-primary btn-xs dropdown-toggle">
                                            操作 <span class="caret"></span>
                                        </button>
                                        <ul class="dropdown-menu">
                                            <li>
                                                <a onclick="add('{:url('admin/add', ['id' => $v['id'], 'type' => $v['type'], 'url' => '-1'])}')">修改</a>
                                            </li>
                                            {if $v.id neq 1}
                                            <li class="divider"></li>
                                            <li><a onclick="del({$v.id})">删除</a>
                                                {/if}
                                        </ul>
                                    </div>
                                </td>
                            </tr>
                            {/volist}
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}
{load href="__STYLE__/admin/plugins/bootstrap/bootstrap-table.min.css"}
{load href="__STYLE__/admin/plugins/bootstrap/bootstrap-table.min.js"}
{load href="__STYLE__/admin/plugins/bootstrap/bootstrap-table-zh-CN.min.js"}
<script type="text/javascript">
    function add(url) {
        layer.open({
            type: 2,
            title: '管理员信息',
            shadeClose: false,
            shade: 0.2,
            area: ['80%', '80%'],
            skin: 'shangchuantup',
            // shift:-1,
            content: url,
        });
    }

    function del(id) {
        swal_del(id, "{:url('del')}", {title: '此管理员'});

    }
</script>